package com.pucheng.bracelet.ui.activity.gpsrun

import android.os.Bundle
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.pucheng.bracelet.R
import com.pucheng.bracelet.app.base.BaseHistoryToListActivity
import com.pucheng.bracelet.data.bean.HistoryListBean
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel

class GPSRunHistoryActivity : BaseHistoryToListActivity<BaseViewModel,HistoryListBean>(){


    private var historyLists = mutableListOf<HistoryListBean>()
    private lateinit var mAdapter: BaseQuickAdapter<HistoryListBean,BaseViewHolder>

    override fun initView(savedInstanceState: Bundle?) {
        mAdapter = object : BaseQuickAdapter<HistoryListBean,BaseViewHolder>(R.layout.item_user_info,historyLists){
            override fun convert(holder: BaseViewHolder, item: HistoryListBean) {

            }

        }
        super.initView(savedInstanceState)
        mAdapter.data.clear()
        mAdapter.setEmptyView(R.layout.layout_empty)
        mAdapter.isUseEmpty = true
        mAdapter.notifyDataSetChanged()
    }

    override fun getHistoryAdapter(): BaseQuickAdapter<HistoryListBean, BaseViewHolder> = mAdapter

    override fun titleResId(): Int = R.string.gps_run_hittory

}